<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<script type="text/javascript">
	$(function() {
		mallShopSettlementListModule.init();
	});

	var mallShopSettlementListModule = (function(){
		/*初始化时间查询*/
		var initDate = function(){
			$("input[name='createTime_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
			$("input[name='createTime_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
			$("input[name='settlementTime_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
			$("input[name='settlementTime_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
		}
		var module = {
			init :function(){
				initDate();
			},
			exportFile :function() {
				window.location.href = 'mallShopSettlementController.do?export&'+$("#mallShopSettlementListForm").serialize();
			},
			details : function (shopId) {
				var url = 'mallShopSettlementController.do?detailslist&shopId='+shopId;
				addOneTab('结算清单',url);
			}

		}
		return module;
	})();
</script>


<div class="easyui-layout" fit="true">
	<div region="center" style="padding:0px;border:0px">
		<t:datagrid name="mallShopSettlementList" title="商品推荐" actionUrl="mallShopSettlementController.do?datagrid" idField="id" fit="true" queryMode="group">
			<t:dgCol title="编号" field="id" hidden="true"></t:dgCol>
			<t:dgCol title="商家名称" field="companyName"  query="true"  width="240"></t:dgCol>
			<t:dgCol title="店铺名称" field="shopName" query="true"  width="120"></t:dgCol>
			<t:dgCol title="交易总金额" field="orderMoney"   width="120"  ></t:dgCol>
			<t:dgCol title="结算金额" field="settlementMoney"   width="120"></t:dgCol>
			<t:dgCol title="交易服务费" field="settlementExpenses"   width="120"></t:dgCol>
			<t:dgCol title="提前结算服务费" field="settlementExpensesAdvance"   width="120"></t:dgCol>
			<t:dgCol title="交易时间" field="createTime" queryMode="group" query="true" hidden="true" width="120"></t:dgCol>
			<t:dgCol title="结算时间" field="settlementTime" queryMode="group" query="true" hidden="true" width="120"></t:dgCol>
			<t:dgCol title="操作" field="opt" width="100"></t:dgCol>
			<t:dgFunOpt funname="mallShopSettlementListModule.details(id)" title="结算清单"></t:dgFunOpt>
			<t:dgToolBar  title="导出" icon="icon-putout" funname="mallShopSettlementListModule.exportFile"></t:dgToolBar>
			<%--<t:dgToolBar title="编辑" icon="icon-edit" url="mallProductRecommendController.do?addorupdate" funname="update"></t:dgToolBar>
			<t:dgToolBar title="查看" icon="icon-search" url="mallProductRecommendController.do?addorupdate" funname="detail"></t:dgToolBar>--%>
		</t:datagrid>
	</div>
</div>